{{$user->ause_name}}
<div class="p-l-20 p-t-4 p-b-4">
    <div class="grid_4">Privilege</div>
	<div class="grid_2">
        Position
    </div>
    <div class="grid_2">
        Read/Write
    </div>
    <div class="grid_2">
        Read only
    </div>
    <div class="grid_2">
        Disable
    </div>
</div>
<div class="clear"></div>
{{foreach $privileges as $pri}}
	{{$secretkey=time()+rand()}}{{$signature=$pri->apri_id|cat:$secretkey|cat:$salt|md5}}
    {{if $smarty.session.auth['user']->ause_position>=$pri->apri_position}}
    <div class="p-l-20 p-t-4 p-b-4">
        <div class="grid_4">{{$pri->apri_name}}</div>
        <div class="grid_2">{{$pri->apri_position}}</div>
        <div class="grid_2">
            <input name="{{$pri->apri_id}}" 
                   {{if $pri->aupr_permission|default:'0'==='777'}}checked="1"{{/if}}
                   onclick="changeprivilege('{{$user->ause_id}}','{{$pri->apri_id}}','777','{{$secretkey}}','{{$signature}}')" 
                   value="777" type="radio"/>
        </div>
        <div class="grid_2">
            <input name="{{$pri->apri_id}}" 
                   {{if $pri->aupr_permission|default:'0'==='755'}}checked="1"{{/if}}
                   onclick="changeprivilege('{{$user->ause_id}}','{{$pri->apri_id}}','755','{{$secretkey}}','{{$signature}}')" 
                   value="755" type="radio"/>
        </div>
        <div class="grid_2">
            <input name="{{$pri->apri_id}}" 
                   {{if $pri->aupr_permission|default:'0'==='0'}}checked="1"{{/if}}
                   onclick="changeprivilege('{{$user->ause_id}}','{{$pri->apri_id}}','0','{{$secretkey}}','{{$signature}}')" 
                   value="0" type="radio"/>
        </div>
    </div>
    <div class="clear"></div>
    {{/if}}
{{/foreach}}